<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>~/gnustep/mainFrazione.m.html</title>
<meta name="Generator" content="Vim/7.2">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000"><font face="monospace">
<font color="#ff40ff">#import </font><font color="#ff6060">&quot;Frazione.h&quot;</font><br>
<font color="#ff40ff">#import </font><font color="#ff6060">&lt;stdio.h&gt;</font><br>
<br>
<font color="#00ff00">int</font>&nbsp;main( <font color="#00ff00">int</font>&nbsp;argc, <font color="#00ff00">char</font>&nbsp;*argv[] ) {<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Frazione *frazione= [Frazione alloc]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione init];<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione setNumeratore: <font color="#ff6060">1</font>&nbsp;]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione setDenominatore: <font color="#ff6060">2</font>]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(<font color="#ff6060">&quot;Frazione 1</font><font color="#ff40ff">\n</font><font color="#ff6060">&quot;</font>); <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione print];<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Frazione *frazione2 = [[Frazione alloc] init ];<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione2 setNumeratore : <font color="#ff6060">3</font>&nbsp;];<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione2 setDenominatore : <font color="#ff6060">4</font>&nbsp;];<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(<font color="#ff6060">&quot;Frazione 2</font><font color="#ff40ff">\n</font><font color="#ff6060">&quot;</font>); <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione2 print ];<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(<font color="#ff6060">&quot;Frazione 1</font><font color="#ff40ff">\n</font><font color="#ff6060">&quot;</font>); <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione print ];<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione moltiplica: frazione2 ]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(<font color="#ff6060">&quot;Frazione 1 dopo moltiplicazione</font><font color="#ff40ff">\n</font><font color="#ff6060">&quot;</font>); <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione print ];<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione dividi: frazione2 ]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(<font color="#ff6060">&quot;Frazione dopo divisione 1</font><font color="#ff40ff">\n</font><font color="#ff6060">&quot;</font>); <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione print ]; <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(<font color="#ff6060">&quot;Frazione 2 dopo moltiplicazione e divisione </font><font color="#ff40ff">\n</font><font color="#ff6060">&quot;</font>);<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione2 print ]; <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Frazione *frazione3 = [[Frazione alloc] init ];<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione3 setNumeratore : <font color="#ff6060">1</font>&nbsp;];<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione3 setDenominatore : <font color="#ff6060">1</font>&nbsp;];<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(<font color="#ff6060">&quot;Frazione 1</font><font color="#ff40ff">\n</font><font color="#ff6060">&quot;</font>); <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione2 print ];<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione2 somma: frazione3 ];<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(<font color="#ff6060">&quot;Frazione 1</font><font color="#ff40ff">\n</font><font color="#ff6060">&quot;</font>); <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione2 print ]; <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione release]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione2 release]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;[frazione3 release]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
}<br>
</font></body>
</html>
